import request from '@/utils/request'

// 查询用户意向列表
export function listIntention(query) {
  return request({
    url: '/admin/intention/list',
    method: 'get',
    params: query
  })
}

// 查询用户意向详细
export function getIntention(id) {
  return request({
    url: '/admin/intention/' + id,
    method: 'get'
  })
}

// 新增用户意向
export function addIntention(data) {
  return request({
    url: '/admin/intention',
    method: 'post',
    data: data
  })
}

// 修改用户意向
export function updateIntention(data) {
  return request({
    url: '/admin/intention',
    method: 'put',
    data: data
  })
}

// 删除用户意向
export function delIntention(id) {
  return request({
    url: '/admin/intention/' + id,
    method: 'delete'
  })
}

// 标记已通知
export function updateIsNotified(id) {
  return request({
    url: '/admin/intention/isNotified/' + id,
    method: 'get'
  })
}

// 标记已拥有
export function updateIsHave(id) {
  return request({
    url: '/admin/intention/isHave/' + id,
    method: 'get'
  })
}
